package com.qfedu.edu.seckill.aclservice.controller;


import com.qfedu.edu.po.User;
import com.qfedu.edu.result.R;
import com.qfedu.edu.seckill.aclservice.service.UserService;
import org.springframework.security.access.annotation.Secured;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;

import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;
import java.util.List;

/**
 * <p>
 *  前端控制器
 * </p>
 *
 * @author xiaobobo
 * @since 2025-03-26
 */
@RestController
@RequestMapping("/aclservice/user")
public class UserController {

    @Resource
    private UserService userService;
    @GetMapping("/list")
    @Secured({"ROLE_admin"})
    public Object test(){
        List<User> list = userService.list(null);
        return R.ok().data("userlist", list);
    }
}

